package com.atguigu.gulimall.ware.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author:Panghl
 * @Description:
 * @Date: Created in 7:26 2022/6/14
 * @Modified By:
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {

    /**
     * /product/spuinfo/info/{id}
     * /api/product/spuinfo/info/{id}
     * 1. 让所有请求过网关
     *  1.@FeignClient("gulimall-gateway") ： 给gateway发送请求
     *  2./api/product/spuinfo/info/{id}
     * 2. 直接让后台指定服务处理
     *  1.@FeignClient("gulimall-product")
     *  2./product/spuinfo/info/{id}
     * @param id
     * @return
     */
    @RequestMapping("/product/spuinfo/info/{id}")
    public R info(@PathVariable("id") Long id);

}
